var person = {
    username : "jack",
    password : "1234",
    "show" : function(){
        console.info("show执行了");
    },
    course : {
        en : 100,
        math : 99
    }
}



let {username,password,show} = person;

console.log("username="+username+"password="+password)

show();


// 分步解构 en 和 math 
// let {course} = person;


// console.log(course)

// let {en,math} = course;

// console.log(en+" "+math)



//从person中直接把en 和 math的值 解构 出来
let {course:{en,math}} = person;
console.log(en+" "+math)


//解构数组中的数据
let arr = [10,20,30]

let  [a,b,c] = arr 

console.log(a+" "+b+" "+c)

let brr = ['张三','李四']

let [name1,name2] = brr;

console.log(name1+" "+name2)





